package com.zmm.weblog.common.config;

import com.alibaba.excel.EasyExcel;
import com.zmm.weblog.common.entity.DynamicEntity;
import com.zmm.weblog.common.listener.DynamicDataListener;

import java.util.List;

public class EasyExcelExample {
    public static void main(String[] args) {
        String fileName = "E:111.xlsx";

        DynamicDataListener listener = new DynamicDataListener();
        EasyExcel.read(fileName, listener).sheet().doRead();

        List<DynamicEntity> entityList = listener.getEntityList();
        for (DynamicEntity entity : entityList) {
            System.out.println(entity);
        }
    }
}